/*
 * Copyright (c) 2011.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.skavookie.expressions

/**
 * Created by IntelliJ IDEA.
 * User: joshua
 * Date: 5/24/11
 * Time: 12:09 PM
 * To change this template use File | Settings | File Templates.
 */

abstract class FractionalExpr[T](implicit fra: Fractional[T]) extends NumericExpr[T]()(fra) {
	def getFractional = fra
	def /(rhs: Expr[T]): Expr[T] = DivExpr(this, rhs)
}

case class LiteralFractional[T](literal: T)(implicit fra: Fractional[T], implicit val manifest: Manifest[T]) extends FractionalExpr[T] with TLiteral[T]
case class DivExpr[T](lhs: Expr[T], rhs: Expr[T])(implicit fra: Fractional[T]) extends FractionalExpr[T]